/*
 *  SuperAggroAI.h
 *  RiskAI
 *
 *  Super Aggo AI will attack everything and anything that he can.
 *  
 *  He operates on the basic priorities:
 *  
 *    1) Attack as many territories as possible
 *			- Pick territories with lots of borders, especially ones
 *			  that border territories already picked
 *			- Distribute troops to territories that have offensive borders
 *	  
 *    2) Do as much damage as possible
 *			- Put more troops next to enemy territories with bigger armies
 *			- ALWAYS defend with as many dice as possible
 *
 */

#ifndef SUPER_AGGRO_AI_H_INCLUDED
#define SUPER_AGGRO_AI_H_INCLUDED

#include "Player.h"

#include <map>

class CSuperAggroAI : public CPlayer
{
public:

	CSuperAggroAI(int iIndex, CBoard* pxBoard);

	// virtual functions overridden in derived classes
	virtual int PickTerritory(std::vector<int> viAvailables);
	virtual int AssignTroops(int iNumTroops);
	virtual int MoveTroops(int iSourceIndex, int iDestinationIndex);
	virtual RiskAction DecideOnAction(std::vector<int> viViableAttackers);
	virtual int PickDefendingDie(int* aiAttackDice, int iTarget);
	virtual CFortification FortifyTroops(std::vector<int> viFortifiers);

private:

	// Keep track of which territories are bordered by enemies
	void GetOffensiveTerritories();
	std::vector<int> m_viOffense;

	// Figure out where to put armies when they are produced
	void CalculateBudget(int iNumTroops);
	bool m_bBudgetCalculated;
	std::map<int,int> m_miiBudget;
	
};

#endif // SUPER_AGGRO_AI_H_INCLUDED